Spectroscopic classification of conformance with dietary restrictions

ABSTRACT

A device may receive a classification model generated based on a set of spectroscopic measurements performed by a first spectrometer. The device may store the classification model in a data structure. The device may receive a spectroscopic measurement of an unknown sample from a second spectrometer. The device may obtain the classification model from the data structure. The device may classify the unknown sample into a Kosher or non-Kosher group or a Halal or non-Halal group based on the spectroscopic measurement and the classification model. The device may provide information identifying the unknown sample based on the classifying of the unknown sample.

RELATED APPLICATION

This application claims priority under 35 U.S.C. § 119 to U.S.Provisional Patent Application No. 62/379,605 filed on Aug. 25, 2016,the content of which is incorporated by reference herein in itsentirety.

BACKGROUND

Raw material identification may be utilized for quality-control ofpharmaceutical products, to determine a type of unknown chemical, or thelike. For example, raw material identification may be performed on acompound to determine whether component ingredients of the compoundcorrespond to a packaging label associated with the compound.Spectroscopy may facilitate non-destructive raw material identification(RMID) with reduced preparation and data acquisition time relative toother chemistry techniques.

Some people may abide by dietary restrictions relating to a tradition ora religion. For example, some Jewish people may desire to eat only foodsthat have been deemed Kosher in accordance with Jewish law. Similarly,some Muslim people may desire to eat only foods that have been deemedHalal in accordance with Islamic law. Additionally, many other peoplemay follow other dietary restrictions relating to a tradition, areligion, an ethical code, or the like. A feature of both Koshercertification (i.e., designation of a food item as Kosher) and Halalcertification (i.e., designation of a food item as Halal) is conformancewith laws regarding the slaughter of animals. For example, both Judaicritual slaughter (Shechita) and Islamic ritual slaughter (Zabihah)require an animal to be cut across the neck with a non-serrated blade ina single clean attempt to sever main blood vessels of the animal, and todrain the blood of the animal.

SUMMARY

According to some possible implementations, a device may include one ormore processors. The one or more processors may receive informationidentifying a result of a spectroscopic measurement of an unknownsample. The one or more processors may perform one or moreclassifications of the unknown sample to classify the unknown sampleinto a particular group based on the result of the spectroscopicmeasurement and one or more classification models. The one or moreclassification models may use a support vector machine (SVM) classifiertechnique. The one or more classification models may relate to a set ofgroups including the particular group. A first subset of the set ofgroups may be a first meta-group including the particular group. Asecond subset of the set of groups may be a second meta-group notincluding the particular group. The one or more processors may provideinformation indicating a classification of the unknown sample into thefirst meta-group based on performing the one or more classifications ofthe unknown sample to classify the unknown sample into the particulargroup.

According to some possible implementations, a non-transitorycomputer-readable medium may store one or more instructions that, whenexecuted by one or more processors, cause the one or more processors toreceive information identifying a spectrum of an unknown sample analyzedby a spectrometer. The one or more instructions, when executed by theone or more processors, may cause the one or more processors to performa first classification of the unknown sample based on the spectrum ofthe unknown sample and a global classification model. The globalclassification model may be associated with a support vector machine(SVM) classifier technique. The global classification model may includea plurality of groups. The one or more instructions, when executed bythe one or more processors, may cause the one or more processors togenerate a local classification model based on a result of the firstclassification of the unknown sample. The one or more instructions, whenexecuted by the one or more processors, may cause the one or moreprocessors to perform a second classification of the unknown samplebased on the spectrum of the unknown sample and the local classificationmodel. The one or more instructions, when executed by the one or moreprocessors, may cause the one or more processors to provide informationidentifying a meta-group to which the unknown sample is classified basedon the local classification model. The meta-group may include a subsetof the plurality of groups.

According to some possible implementations, a method may includereceiving, by a device, a classification model generated based on a setof spectroscopic measurements performed by a first spectrometer. Themethod may include storing, by the device, the classification model in adata structure. The method may include receiving, by the device, aspectroscopic measurement of an unknown sample from a secondspectrometer. The method may include obtaining, by the device, theclassification model from the data structure. The method may includeclassifying, by the device, the unknown sample into a Kosher ornon-Kosher group or a Halal or non-Halal group based on thespectroscopic measurement and the classification model. The method mayinclude providing, by the device, information identifying the unknownsample based on the classifying of the unknown sample.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a diagram of an overview of an example implementationdescribed herein;

FIG. 2 is a diagram of an example environment in which systems and/ormethods, described herein, may be implemented;

FIG. 3 is a diagram of example components of one or more devices of FIG.2;

FIG. 4 is a flow chart of an example process for generating aclassification model based on a training set;

FIG. 5 is a diagram of an example implementation relating to the exampleprocess shown in FIG. 4;

FIG. 6 is a flow chart of an example process for utilizing aclassification model to categorize an unknown sample; and

FIGS. 7A-7C are diagrams of an example implementation relating to theexample process shown in FIG. 6.

DETAILED DESCRIPTION

The following detailed description of example implementations refers tothe accompanying drawings. The same reference numbers in differentdrawings may identify the same or similar elements.

Many people abide by dietary restrictions relating to a manner in whichanimals are prepared for consumption. For example, in both Jewishtradition and in Islamic tradition, animals are required to beslaughtered using a cut across the neck with a non-serrated blade in asingle clean attempt to sever main blood vessels of the animal.Moreover, the animal must be drained of blood after the slaughter.Similarly, some traditions restrict a type of animal that may beconsumed. For example, meat from a pig is neither Kosher nor Halalregardless of a method of slaughter. As another example, some Islamictraditions permit consumption of shellfish, but Jewish tradition doesnot permit consumption of shellfish.

Although meat may be certified as Kosher (i.e., allowed under the Jewishtradition) or Halal (i.e., allowed under the Islamic tradition), buyersmay be unable to determine whether the meat was properly slaughteredbased on visual inspection. Moreover, when consuming food at arestaurant, customers may be unable to view an inspection label affixedto packaging of meat prior to preparation of the meat. Furthermore, acustomer may be unable to determine a type of animal from which the meatis derived based on visual inspection. This may result in a person whoabides by a dietary restriction being hesitant to consume animalproducts.

Physical conditions and/or chemical conditions of an animal may bealtered based on a type of slaughter. For example, cortisol levels ofanimals for which Kosher slaughter or Halal slaughter is performed maybe different from cortisol levels of animals for which another type ofslaughter is performed. Moreover, different types of meats obtained fromdifferent animals may be associated with physical differences and/orchemical differences. For example, proteins from pork meat of a pig maydiffer from proteins from beef meat of a cow. However, large amounts ofvariance may exist between different types of animals, different breedsof a particular type of animal, different cuts of meat of a particularanimal, or the like. This may limit an effectiveness of comparing anunknown sample of meat to a set of known reference samples of meat.

Implementations, described herein, may provide a device (e.g., aspectrometer) that utilizes local classification modeling to identify anunknown sample based on a spectroscopic measurement of the unknownsample. In this way, a spectrometer may be utilized to determine whetheran unknown sample corresponds to a Kosher type of meat, a Halal type ofmeat, or a type of meat that is neither Kosher nor Halal. In this way, abuyer or a consumer of meat can verify that meat being sold as ormarketed as being Kosher or Halal is genuine. Moreover, by aggregatingmultiple classification groups (e.g., a Kosher beef flank steak, aKosher beef strip steak, and a Kosher beef sirloin steak), for whichrelatively few samples are provided in a training set, into a meta-group(e.g., Kosher) to perform a classification (e.g., Kosher or non-Kosher),an accuracy of the classification is improved relative to attempting toperform a classification into a particular classification group.

FIG. 1 is a diagram of an overview of an example implementation 100described herein. As shown in FIG. 1, example implementation 100 mayinclude a control device and a spectrometer.

As further shown in FIG. 1, the control device may receive aclassification model regarding groups of items. For example, the controldevice may receive a particular classification model for classifyingitems of food (e.g., meat) as Halal or non-Halal based on aspectroscopic measurement relating to a physical characteristic and/or achemical characteristic of the item of food, such as a cortisol level ofthe item of food, a type of animal from which the item of food isderived, or the like. In another example, the control device may receiveanother classification model for classifying items of food as Kosher ornon-Kosher. The particular classification model may be associated withaggregating multiple groups based on a common characteristic. Forexample, the classification model may be associated with aggregating aset of Halal groups (e.g., Halal beef strip streak and Halal beef flanksteak or Halal chicken breast and Halal chicken thigh) or a set ofnon-Halal classes (e.g., non-Halal beef strip steak and non-Halal beefflank steak) into a set of meta-groups (e.g., Halal and non-Halal).

As further shown in FIG. 1, the control device may cause thespectrometer to perform spectroscopy on an unknown sample (e.g., an itemof food, such as a packaged item of meat at a supermarket or a prepareddish at a restaurant). The control device may receive a set ofspectroscopic measurements of the unknown sample based on causing thespectrometer to perform spectroscopy. For example, the control devicemay receive information identifying a spectrum of the unknown sample. Inthis case, the spectrum of the unknown sample may correspond to cortisollevels in the unknown sample, which may be different for Kosher ornon-Kosher meat or for Halal or non-Halal meat, thus permitting aclassification of the unknown sample. The control device may classifythe unknown sample and may provide information identifying acharacteristic of the group of items. For example, the control devicemay identify a meta-group of the unknown sample as Halal, and mayprovide information indicating that the sample is predicted to be Halal.In some implementations, the control device may generate a localclassification model based on a global classification model, and mayutilize the local classification model to classify the unknown sample.In some implementations, the control device may utilize a particulartype of classifier.

In this way, a control device uses a classification model and results ofspectroscopy to identify whether an unknown sample is associated with aparticular characteristic (e.g., Kosher or Halal) of a meta-group ofmultiple classification groups. Moreover, based on utilizing aclassification model associated with aggregating multiple groups basedon the particular characteristic, the control device improves anaccuracy of the classification relative to attempting to classify theunknown sample into an individual group.

As indicated above, FIG. 1 is provided merely as an example. Otherexamples are possible and may differ from what was described with regardto FIG. 1.

FIG. 2 is a diagram of an example environment 200 in which systemsand/or methods, described herein, may be implemented. As shown in FIG.2, environment 200 may include a control device 210, a spectrometer 220,and a network 230. Devices of environment 200 may interconnect via wiredconnections, wireless connections, or a combination of wired andwireless connections.

Control device 210 includes one or more devices capable of storing,processing, and/or routing information associated with identifying anunknown sample based on a spectroscopic measurement. For example,control device 210 may include a server, a computer (e.g., a desktopcomputer, a laptop computer, or a tablet computer), a wearable device, acloud computing device in a cloud computing environment, a mobiledevice, a smart phone, or the like that generates a classification modelusing a particular classifier and based on a set of spectroscopicmeasurements of a training set, and/or utilizes the classification modelto identify an unknown sample. In some implementations, multiple controldevices 210 may utilize a common classification model. For example, afirst control device 210 may generate the classification model andprovide the classification model to a second control device 210, whichmay use the classification model to identify an unknown sample (e.g., ata restaurant, at a meat packaging plant, etc.). For example, controldevice 210 may utilize a support vector machine (SVM) type of classifierwith a linear kernel, a radial basis function (rbf) kernel, or the like.In this case, control device 210 may perform a classification based on aconfidence measure (wProb) technique, a decision value (DecVal)technique, or the like. In some implementations, control device 210 maybe associated with a particular spectrometer 220. In someimplementations, control device 210 may be associated with multiplespectrometers 220. In some implementations, control device 210 mayreceive information from and/or transmit information to another devicein environment 200, such as spectrometer 220.

Spectrometer 220 includes one or more devices capable of performing aspectroscopic measurement on a sample. For example, spectrometer 220 mayinclude a spectrometer device that performs spectroscopy (e.g.,vibrational spectroscopy, such as near infrared (NIR) spectroscopy,mid-infrared spectroscopy (mid-IR), Raman spectroscopy, or the like). Insome implementations, spectrometer 220 may be incorporated into awearable device, such as a wearable spectrometer or the like. In someimplementations, spectrometer 220 may be incorporated into a mobiledevice, such as a smart phone, a tablet computer, a laptop computer, orthe like. In some implementations, spectrometer 220 may receiveinformation from and/or transmit information to another device inenvironment 200, such as control device 210.

Network 230 may include one or more wired and/or wireless networks. Forexample, network 230 may include a cellular network (e.g., a long-termevolution (LTE) network, a 3G network, a code division multiple access(CDMA) network, etc.), a public land mobile network (PLMN), a local areanetwork (LAN), a wide area network (WAN), a metropolitan area network(MAN), a telephone network (e.g., the Public Switched Telephone Network(PSTN)), a private network, an ad hoc network, an intranet, theInternet, a fiber optic-based network, a cloud computing network, or thelike, and/or a combination of these or other types of networks.

The number and arrangement of devices and networks shown in FIG. 2 areprovided as an example. In practice, there may be additional devicesand/or networks, fewer devices and/or networks, different devices and/ornetworks, or differently arranged devices and/or networks than thoseshown in FIG. 2. Furthermore, two or more devices shown in FIG. 2 may beimplemented within a single device, or a single device shown in FIG. 2may be implemented as multiple, distributed devices. For example,although control device 210 and spectrometer 220 are described, herein,as being two separate devices, control device 210 and spectrometer 220may be implemented within a single device. Additionally, oralternatively, a set of devices (e.g., one or more devices) ofenvironment 200 may perform one or more functions described as beingperformed by another set of devices of environment 200.

FIG. 3 is a diagram of example components of a device 300. Device 300may correspond to control device 210 and/or spectrometer 220. In someimplementations, control device 210 and/or spectrometer 220 may includeone or more devices 300 and/or one or more components of device 300. Asshown in FIG. 3, device 300 may include a bus 310, a processor 320, amemory 330, a storage component 340, an input component 350, an outputcomponent 360, and a communication interface 370.

Bus 310 includes a component that permits communication among thecomponents of device 300. Processor 320 is implemented in hardware,firmware, or a combination of hardware and software. Processor 320includes a central processing unit (CPU), a graphics processing unit(GPU), an accelerated processing unit (APU), a microprocessor, amicrocontroller, a digital signal processor, a field-programmable gatearray (FPGA), an application-specific integrated circuit (ASIC), oranother type of processing component. In some implementations, processor320 includes one or more processors capable of being programmed toperform a function. Memory 330 includes a random access memory (RAM), aread only memory (ROM), and/or another type of dynamic or static storagedevice (e.g., a flash memory, a magnetic memory, and/or an opticalmemory) that stores information and/or instructions for use by processor320.

Storage component 340 stores information and/or software related to theoperation and use of device 300. For example, storage component 340 mayinclude a hard disk (e.g., a magnetic disk, an optical disk, amagneto-optic disk, and/or a solid state disk), a compact disc (CD), adigital versatile disc (DVD), a floppy disk, a cartridge, a magnetictape, and/or another type of non-transitory computer-readable medium,along with a corresponding drive.

Input component 350 includes a component that permits device 300 toreceive information, such as via user input (e.g., a touch screendisplay, a keyboard, a keypad, a mouse, a button, a switch, and/or amicrophone). Additionally, or alternatively, input component 350 mayinclude a sensor for sensing information (e.g., a global positioningsystem (GPS) component, an accelerometer, a gyroscope, and/or anactuator). Output component 360 includes a component that providesoutput information from device 300 (e.g., a display, a speaker, and/orone or more light-emitting diodes (LEDs)).

Communication interface 370 includes a transceiver-like component (e.g.,a transceiver and/or a separate receiver and transmitter) that enablesdevice 300 to communicate with other devices, such as via a wiredconnection, a wireless connection, or a combination of wired andwireless connections. Communication interface 370 may permit device 300to receive information from another device and/or provide information toanother device. For example, communication interface 370 may include anEthernet interface, an optical interface, a coaxial interface, aninfrared interface, a radio frequency (RF) interface, a universal serialbus (USB) interface, a Wi-Fi interface, a cellular network interface, orthe like.

Device 300 may perform one or more processes described herein. Device300 may perform these processes in response to processor 320 executingsoftware instructions stored by a non-transitory computer-readablemedium, such as memory 330 and/or storage component 340. Acomputer-readable medium is defined herein as a non-transitory memorydevice. A memory device includes memory space within a single physicalstorage device or memory space spread across multiple physical storagedevices.

Software instructions may be read into memory 330 and/or storagecomponent 340 from another computer-readable medium or from anotherdevice via communication interface 370. When executed, softwareinstructions stored in memory 330 and/or storage component 340 may causeprocessor 320 to perform one or more processes described herein.Additionally, or alternatively, hardwired circuitry may be used in placeof or in combination with software instructions to perform one or moreprocesses described herein. Thus, implementations described herein arenot limited to any specific combination of hardware circuitry andsoftware.

The number and arrangement of components shown in FIG. 3 are provided asan example. In practice, device 300 may include additional components,fewer components, different components, or differently arrangedcomponents than those shown in FIG. 3. Additionally, or alternatively, aset of components (e.g., one or more components) of device 300 mayperform one or more functions described as being performed by anotherset of components of device 300.

FIG. 4 is a flow chart of an example process 400 for generating aclassification model based on a training set. In some implementations,one or more process blocks of FIG. 4 may be performed by control device210. In some implementations, one or more process blocks of FIG. 4 maybe performed by another device or a group of devices separate from orincluding control device 210, such as spectrometer 220.

As shown in FIG. 4, process 400 may include receiving results ofspectroscopy performed on a training set (block 410). For example,control device 210 may receive results of spectroscopy performed on thetraining set. The training set may refer to a set of samples of one ormore known items, which are utilized to generate a classification model.For example, the training set may include one or more samples of a setof meats (e.g., a set of Kosher meats, a set of non-Kosher meats, a setof Halal meats, or a set of non-Halal meats) to control for localdifferences in a particular item of meat (e.g., a first cortisol levelin a first sample of Kosher beef flank steak and a second cortisol levelin a second sample of Kosher beef flank steak from a common source). Insome implementations, the set of items may include multiple types ofmeat (e.g., beef, pork, chicken, etc.), multiple cuts of meat (e.g.,flank, rib, breast, etc.), multiple preparations of meat (e.g., raw,seared, stewed, etc.), or the like to permit classification of unknownsamples that a user may encounter.

In some implementations, the training set may be selected based on anexpected set of items for which an identification is to be performed.For example, when an identification of an unknown sample is expected tobe performed for Kosher beef and non-Kosher beef, the training set mayinclude a set of samples of cuts of beef, breeds of cow, cooked beef anduncooked beef, or the like. In some implementations, the training setmay be selected to include a particular quantity of samples for eachtype of meat. For example, the training set may be selected to includemultiple samples (e.g., 5 samples, 10 samples, 15 samples, 50 samples,etc.) of a particular group of meat, such as Kosher hotdogs, non-Kosherhotdogs, or the like. In this way, control device 210 can be providedwith a threshold quantity of spectra associated with a particular typeof meat, thereby facilitating generation of a group, for aclassification model (e.g., a global classification model or a localclassification model), to which unknown samples can be accuratelyassigned.

However, based on a local variance in samples (e.g., in a common source,a common breed, a common cut of meat, a common type of animal), athreshold quantity of samples may be infeasible, and control device 210may generate the classification model using fewer samples than thethreshold quantity of samples. In this case, control device 210 mayaggregate multiple groups to improve prediction accuracy relative toperforming predictions using groups identified using fewer samples thanthe threshold quantity of samples.

Additionally, or alternatively, during configuration, testing may beperformed of multiple classifier techniques to select a particularclassifier technique associated with a threshold level of performance(e.g., a threshold prediction success rate) when performing predictionsusing a model trained on less than a threshold quantity of samples of atraining set. For example, control device 210 may perform testing usinga set of configuration parameters, such as using a linear kernel, an rbfkernel, a wProb confidence metric, a wDecVals confidence metric, or thelike, and may select a particular combination of configurationparameters for subsequent use based on comparing performance ofcombinations of configuration parameters.

In some implementations, control device 210 may receive informationidentifying a set of spectra corresponding to samples of a training set.For example, control device 210 may receive information identifying aparticular spectrum, which was observed when spectrometer 220 performedspectroscopy on the training set. Additionally, or alternatively,control device 210 may receive other information as results of the setof spectroscopic measurements. For example, control device 210 mayreceive information associated with identifying an absorption of energy,an emission of energy, a scattering of energy, or the like.

In some implementations, control device 210 may receive informationidentifying the results of the set of spectroscopic measurements frommultiple spectrometers 220. For example, control device 210 may controlfor physical conditions, such as a difference between the multiplespectrometers 220, a potential difference in a lab condition, or thelike, by receiving spectroscopic measurements performed by multiplespectrometers 220, performed at multiple different times, performed atmultiple different locations, or the like.

As further shown in FIG. 4, process 400 may include generating, based onthe results of spectroscopy performed on the training set, aclassification model to categorize an unknown sample (block 420). Forexample, control device 210 may generate, based on the results ofspectroscopy performed on the training set, the classification model tocategorize the unknown sample.

In some implementations, control device 210 may generate aclassification model associated with an SVM classifier technique basedon information identifying the results of spectroscopy. SVM may refer toa supervised learning model that performs pattern recognition forclassification. In some implementations, control device 210 may utilizea particular type of kernel function when generating the classificationmodel using the SVM technique. For example, control device 210 mayutilize an rbf (e.g., termed SVM-rbf) type of kernel function, a linearfunction (e.g., termed SVM-linear and termed hier-SVM-linear whenutilized for a multi-stage classification technique) type of kernelfunction, a sigmoid function type of kernel function, a polynomialfunction type of kernel function, an exponential function type of kernelfunction, or the like. In some implementations, control device 210 mayutilize a particular type of SVM, such as a probability value based SVM(e.g., classification based on determining a probability that a sampleis a member of a class of a set of classes, such as wProb), a decisionvalue based SVM (e.g., classification utilizing a decision function tovote for a group, of a set of groups, as being the group of which thesample is a member, such as DecVal or wDecVal), or the like.

In some implementations, control device 210 may generate theclassification model based on information identifying samples of thetraining set. For example, control device 210 may utilize theinformation identifying the types of compounds represented by samples ofthe training set (e.g., types of items of food) to identify groups ofspectra associated with types of compounds (e.g., groups associated withdifferent animals, groups associated with different breeds of aparticular type of animal, and/or groups associated with different cutsof meat).

In some implementations, control device 210 may train the classificationmodel when generating the classification model. For example, controldevice 210 may cause the classification model to be trained using aportion of the results of spectroscopy. Additionally, or alternatively,control device 210 may perform an assessment of the classificationmodel. For example, control device 210 may verify the classificationmodel (e.g., for predictive strength) utilizing another portion of theresults of spectroscopy.

In some implementations, control device 210 may validate theclassification model when generating the classification model. Forexample, control device 210 may determine a metric relating to resultsof performing classification of a training set, such as a predictionsuccess rate (sometimes termed a PSR or PS) value. In this case, controldevice 210 may test the classification model using a testing technique,such as a T-Odd/P-Even technique (e.g., odd numbered samples areselected as a training set for training the classification model, evennumbered samples are selected as a prediction set for testing theclassification model), a P-Odd/T-Even technique (e.g., odd numberedsamples are selected as a prediction set for testing the classificationmodel, even numbered samples are selected as a training set for trainingthe classification model), a one sample out technique (e.g., for eachsample selected as a single sample prediction set, each other sample isused as a training set), or the like. In some implementations, controldevice 210 may select a particular classifier technique based on theresults of performing classification of the training set. For example,control device 210 may select to use a confidence value based selectiontechnique, a decision value based selection technique, a localclassification modeling based classification technique, or the like. Insome implementations, control device 210 may select the particularclassifier technique based on results of verifying a classificationmodel, generated using the particular classifier technique and atraining set, using a prediction set. Additionally, or alternatively,during manufacture, a particular classifier technique may be selectedbased on results of verifying the classification model.

As further shown in FIG. 4, process 400 may include providing theclassification model based on generating the classification model (block430). For example, control device 210 may provide the classificationmodel based on generating the classification model. In someimplementations, control device 210 may provide the classification modelto other control devices 210 associated with other spectrometers 220after generating the classification model. For example, a first controldevice 210 may generate the classification model and may load theclassification model onto multiple second control devices 210 forutilization with multiple corresponding spectrometers 220. In this case,a particular second control device 210 may store the classificationmodel, and may utilize the classification model in classifying one ormore samples of an unknown set, as described herein with regard to FIG.6. Additionally, or alternatively, control device 210 may store theclassification model for utilization by control device 210 inclassifying the one or more samples. In this way, control device 210provides the classification model for utilization in identification ofunknown samples.

Although FIG. 4 shows example blocks of process 400, in someimplementations, process 400 may include additional blocks, fewerblocks, different blocks, or differently arranged blocks than thosedepicted in FIG. 4. Additionally, or alternatively, two or more of theblocks of process 400 may be performed in parallel.

FIG. 5 is a diagram of an example implementation 500 relating to exampleprocess 400 shown in FIG. 4. FIG. 5 shows an example of generating aclassification model based on a training set.

As shown in FIG. 5, and by reference number 510, spectrometer 220performs spectroscopy on a training set. For example, based on receivinga request to perform spectroscopy from control device 210, spectrometer220 may determine a set of spectra for a set of samples (e.g., a KosherBeef Shoulder sample, a Kosher Flank Steak sample, a Kosher ChickenBreast sample, a Non-Kosher Veal sample, a Non-Kosher Beef Shouldersample, a Non-Kosher Pork Loin sample, or the like). As shown byreference number 520, control device 210 receives a set of spectroscopicmeasurements from spectrometer 220. For example, control device 210 mayreceive information identifying the set of spectra for the set ofsamples. As shown by reference number 530, control device 210 generatesa classification model based on the set of spectroscopic measurementsand using an SVM classifier technique. For example, control device 210trains the classification model to perform a determination of a type ofcompound (e.g., a type of meat) based on an unknown spectra. In thisway, control device 210 generates a model for utilization in determiningwhether an unknown sample is Kosher (or, in another example, Halal orthe like). As shown by reference number 540, control device 210 providesthe classification model for loading to other control devices 210 (notshown) to permit the other control devices 210 to use otherspectrometers 220 (not shown) to perform classifications of unknownsamples (e.g., into Kosher or Non-Kosher groups).

As indicated above, FIG. 5 is provided merely as an example. Otherexamples are possible and may differ from what was described with regardto FIG. 5.

FIG. 6 is a flow chart of an example process 600 for utilizing aclassification model to categorize an unknown sample. In someimplementations, one or more process blocks of FIG. 6 may be performedby spectrometer 220. In some implementations, one or more process blocksof FIG. 6 may be performed by another device or a group of devicesseparate from or including spectrometer 220, such as control device 210.

As shown in FIG. 6, process 600 may include receiving a result ofspectroscopy performed on an unknown sample (block 610). For example,control device 210 may receive the result of spectroscopy performed onthe unknown sample. In some implementations, control device 210 mayreceive the result of spectroscopy based on spectrometer 220 performingspectroscopy without a prior request or instruction from control device210. For example, a user of spectrometer 220 may cause spectrometer 220to perform spectroscopy on an unknown sample and send the result of thespectroscopy to control device 210. In some implementations, controldevice 210 may receive the result of spectroscopy based on causingspectrometer 220 to perform spectroscopy. For example, control device210 may transmit a request to perform a set of spectroscopicmeasurements of an unknown sample, and may receive informationidentifying a spectrum of the unknown sample as a result of the set ofspectroscopic measurements. In some implementations, control device 210may receive information identifying results of a set of spectroscopicmeasurements performed at multiple times, in multiple locations, and/orby multiple spectrometers 220.

Additionally, or alternatively, control device 210 may receiveinformation identifying results of a set of spectroscopic measurementsperformed for multiple portions of the unknown sample. For example,control device 210 may receive a first result of spectroscopy fromspectrometer 220 based on spectrometer 220 performing spectroscopy on afirst portion of the unknown sample and a second result of spectroscopybased on spectrometer 220 performing spectroscopy on a second portion ofthe unknown sample. In this way, control device 210 may account forphysical conditions that may affect the result of spectroscopy, localvariations in the unknown sample that may affect the result ofspectroscopy, or the like.

In some implementations, control device 210 may cause a firstspectrometer 220 to perform a first spectroscopic measurement on a firstportion of the unknown sample and may cause a second spectrometer 220 toperform a second spectroscopic measurement on a second portion of theunknown sample. In this way, control device 210 may reduce a quantity oftime to perform multiple spectroscopic measurements of the unknownsample relative to causing all the spectroscopic measurements to besequentially performed by a single spectrometer 220.

As further shown in FIG. 6, process 600 may include classifying theunknown sample based on the result of spectroscopy and using aclassification model (block 620). For example, control device 210 mayclassify the unknown sample based on the result of spectroscopy andusing the classification model. In some implementations, control device210 may obtain the classification model. For example, control device 210may obtain the classification model from a data structure, and mayutilize the classification model to classify the unknown sample. In someimplementations, control device 210 may generate another classificationmodel based on the classification model, and may utilize the otherclassification model to classify the unknown sample. For example, whencontrol device 210 obtains a global classification model generated basedon a training set of samples, control device 210 may generate a localclassification model associated with the unknown sample (e.g., using anSVM classifier technique) to improve an accuracy of classifying theunknown sample. In this case, control device 210 may classify theunknown sample using the local classification model.

In some implementations, control device 210 may classify the unknownsample into a particular group based on the classification model. Forexample, control device 210 may identify a particular type of meat(e.g., Halal beef shoulder) as a most likely match for the unknownsample based on the results of spectroscopy performed on the unknownsample and the classification model. In some implementations, controldevice 210 may identify one or more other groups to which the unknownsample may be classified. For example, control device 210 may determinea likelihood that the unknown sample is a member of a set of groups, andmay select a threshold quantity of groups, one or more groups with athreshold likelihood, or the like as potential classifications for theunknown sample.

In some implementations, control device 210 may classify the unknownsample into a meta-group (e.g., Kosher or Non-Kosher or Halal orNon-Halal) based on classifying the unknown sample into one or moregroups. For example, based on control device 210 identifying theparticular group of the unknown sample (e.g., Halal beef shoulder),control device 210 may classify the unknown sample into a particularmeta-group with a characteristic related to the particular group (e.g.,a Halal meta-group of multiple types of Halal meat). In someimplementations, control device 210 may aggregate multiple likelihoodsfor multiple groups to classify the unknown sample into a meta-group.For example, when control device 210 determines that the unknown sampleis associated with a first likelihood of being in a first group (e.g.,94% for Halal beef shoulder), a second likelihood of being in a secondgroup (e.g., 3% for Halal beef flank steak), and a third likelihood ofbeing in a third group (e.g., 1% for Non-Halal pork loin), controldevice 210 may aggregate the first and second likelihoods to determine afourth likelihood (e.g., 97% for Halal) relating to a first meta-groupand may determine a fifth likelihood (e.g., 1% for Non-Halal) for asecond meta-group based on the third likelihood. In another example,control device 210 may utilize another mathematical technique foraggregating multiple likelihoods. In this way, control device 210utilizes an aggregation of information related to multipleclassification groups (e.g., for which there may be less than athreshold quantity of samples associated with achieving a thresholdlevel of accuracy) to determine a classification of the unknown samplerelating to a characteristic of the multiple classification groups withthe threshold level of accuracy.

As further shown in FIG. 6, process 600 may include providinginformation associated with classifying the unknown sample (block 630).For example, control device 210 may provide information associated withclassifying the unknown sample. In some implementations, control device210 may provide information identifying a class of the unknown sample.For example, control device 210 may provide information indicating thatthe unknown sample is associated with a particular group (e.g., Kosherbeef flank steak, Non-Kosher pork loin, Halal beef sirloin, or Non-Halalveal tenderloin). In some implementations, control device 210 mayprovide information identifying a characteristic of a class of theunknown sample. For example, control device 210 may provide informationindicating that the unknown sample is associated with a particularmeta-group associated with a particular characteristic (e.g., a Koshermeta-group or a Non-Kosher meta-group or a Halal meta-group or aNon-Halal meta-group).

In some implementations, control device 210 may provide informationidentifying an accuracy of a classification. For example, control device210 may provide information indicating that the unknown sample isclassified to a particular group, a particular meta-group, or the likewith a particular likelihood of accuracy. Additionally, oralternatively, control device 210 may provide information identifying alikelihood associated with another group. For example, control device210 may indicate that there is a 95% likelihood that the unknown sampleis associated with a first group (e.g., Kosher beef flank steak), a 4%likelihood that the unknown sample is associated with a second group(e.g., Kosher beef shoulder), and a 1% likelihood that the unknownsample is associated with a third group (e.g., Non-Kosher beefshoulder).

In some implementations, control device 210 may provide the informationassociated with classifying the unknown sample for display. For example,control device 210 may cause the information to be provided for displayto a user via a user interface (e.g., of control device 210,spectrometer 220, or of another device to which control device 210 maytransmit the information). In some implementations, control device 210may store information associated with classifying the unknown sample.For example, control device 210 may store information identifying aclassification of the unknown sample, a location at which thespectroscopy was performed, a photograph of the unknown sample, and/orother information relating to performing spectroscopy of the unknownsample. In this way, control device 210 may store information for use indetermining whether the unknown sample is being fraudulently/negligentlyrepresented (e.g., as Kosher or as Halal).

Although FIG. 6 shows example blocks of process 600, in someimplementations, process 600 may include additional blocks, fewerblocks, different blocks, or differently arranged blocks than thosedepicted in FIG. 6. Additionally, or alternatively, two or more of theblocks of process 600 may be performed in parallel.

FIGS. 7A-7C are diagrams of an example implementation relating toexample process 600 shown in FIG. 6. FIGS. 7A-7C show example results ofidentifying unknown samples using a set of classification modelsgenerated using a set of classifier techniques, from which a particularconfiguration for accurate identification of unknown samples can beselected.

As shown in FIG. 7A, an example chart 710 shows results of controldevice 210 performing a classification using results of spectroscopyfrom spectrometer 220. For example, control device 210 performs a set ofclassifications of a set of samples 712. In this case, control device210 utilizes a T-odd P-even technique, using a wProb classificationtechnique and an SVM-linear classifier. For example, control device 210selects odd numbered samples as a training set and even numbered samplesas a prediction set for utilization with the wProb classificationtechnique. Based on generating a classification model using theodd-numbered samples, control device 210 performs a classification ofthe even numbered samples, and determines a classification probabilityfor Kosher and Non-Kosher groups, as shown by reference number 714. Asshown by reference number 716, a set of 6 classifications of a total of47 classifications, performed by control device 210, are incorrect,resulting in an 87.23% prediction success rate.

As shown in FIG. 7B, an example chart 720 shows results of controldevice 210 performing another classification using results ofspectroscopy from spectrometer 220. For example, control device 210performs a set of classifications of a set of samples 722. In this case,control device 210 utilizes a one sample out technique, using a wProbclassification technique and an SVM-linear classifier. For example,control device 210 selects a particular sample, generates aclassification model based on results of spectroscopy corresponding toeach other sample, and performs a classification of the sample based onthe classification model. In this case, control device 210 determines aclassification accuracy for Kosher and Non-Kosher groups, as shown byreference number 724 (e.g., a determination of whether a classificationwas accurate). As shown by reference number 726, a set of 4classifications of a total of 94 classifications, performed by controldevice 210, are incorrect, resulting in a 95.74% prediction successrate.

As shown in FIG. 7C, an example chart 730 shows results of controldevice 210 performing another classification using results ofspectroscopy from spectrometer 220. For example, control device 210performs a set of classifications of a set of samples 732. In this case,control device 210 utilizes a T-odd P-even technique, using a wDecValsclassification technique and an SVM-linear classifier. For example,control device 210 generates a classification model using odd numberedsamples, performs a classification on even numbered samples based on theclassification model to generate classifications of the even numberedsamples, and uses a decision values technique to perform a predictionbased on the generated classifications. In this case, control device 210determines a classification probability for Kosher and Non-Koshergroups, as shown by reference number 724. As shown by reference number726, a set of 1 classification of a total of 47 classifications,performed by control device 210, is incorrect, resulting in a 97.87%prediction success rate. In another example, similar results may beachieved for a wDecVals classification technique associated with a onesample out technique generation of a classification model with an SVMlinear classifier. Based on decision values being associated with animproved classification accuracy for quantities of training set samplesless than a threshold, control device 210 may be configured to usedecision values to perform the classification based on spectroscopicmeasurements from spectrometer 220.

As indicated above, FIGS. 7A-7C are provided merely as an example. Otherexamples are possible and may differ from what was described with regardto FIGS. 7A-7C.

Control device 210 utilizes an SVM type of classifier with decisionvalues to permit improved classification of samples for which a trainingset is less than a threshold size, such as less than 100 samples, lessthan 75 samples, less than 50 samples, less than 45 samples, or thelike, relative to another type of classification technique. In this way,a user may be able to reliably use control device 210 and/orspectrometer 220 (e.g., integrated into a single package) to perform aspectroscopic measurement of an item of meat, and receive adetermination (e.g., a numerical determination of a probability, abinary classification, etc.) via a user interface of the control device210 and spectrometer 220 indicating whether the item of meat is Kosheror Halal. In this way, a user may be able to ensure that meat at asupermarket, a restaurant, or the like is accurately labeled with regardto being Kosher or Halal.

The foregoing disclosure provides illustration and description, but isnot intended to be exhaustive or to limit the implementations to theprecise form disclosed. Modifications and variations are possible inlight of the above disclosure or may be acquired from practice of theimplementations.

As used herein, the term component is intended to be broadly construedas hardware, firmware, and/or a combination of hardware and software.

Some implementations are described herein in connection with thresholds.As used herein, satisfying a threshold may refer to a value beinggreater than the threshold, more than the threshold, higher than thethreshold, greater than or equal to the threshold, less than thethreshold, fewer than the threshold, lower than the threshold, less thanor equal to the threshold, equal to the threshold, etc.

It will be apparent that systems and/or methods, described herein, maybe implemented in different forms of hardware, firmware, or acombination of hardware and software. The actual specialized controlhardware or software code used to implement these systems and/or methodsis not limiting of the implementations. Thus, the operation and behaviorof the systems and/or methods were described herein without reference tospecific software code—it being understood that software and hardwarecan be designed to implement the systems and/or methods based on thedescription herein.

Even though particular combinations of features are recited in theclaims and/or disclosed in the specification, these combinations are notintended to limit the disclosure of possible implementations. In fact,many of these features may be combined in ways not specifically recitedin the claims and/or disclosed in the specification. Although eachdependent claim listed below may directly depend on only one claim, thedisclosure of possible implementations includes each dependent claim incombination with every other claim in the claim set.

No element, act, or instruction used herein should be construed ascritical or essential unless explicitly described as such. Also, as usedherein, the articles “a” and “an” are intended to include one or moreitems, and may be used interchangeably with “one or more.” Furthermore,as used herein, the term “set” is intended to include one or more items(e.g., related items, unrelated items, a combination of related items,and unrelated items, etc.), and may be used interchangeably with “one ormore.” Where only one item is intended, the term “one” or similarlanguage is used. Also, as used herein, the terms “has,” “have,”“having,” or the like are intended to be open-ended terms. Further, thephrase “based on” is intended to mean “based, at least in part, on”unless explicitly stated otherwise.

1-20. (canceled)
 21. A method comprising: receiving, by a device,results of spectroscopy performed on a training set, the training setincluding: a first set of samples of a particular type of food, and asecond set of samples of the particular type of food, the first set ofsamples complying with particular dietary restrictions, and the secondset of samples not complying with the particular dietary restrictions;generating, by the device and based on the results of spectroscopyperformed on the training set, a classification model to categorize anunknown sample; and providing, by the device, the classification modelbased on generating the classification model.
 22. The method of claim21, wherein the results of spectroscopy are received from multiplespectrometers.
 23. The method of claim 21, wherein the classificationmodel is associated with a supervised learning model (SVM) technique.24. The method of claim 21, wherein generating the classification modelcomprises: utilizing a termed supervised learning model (SVM)-rhf typeof kernel function to generate the classification model based on theresults of spectroscopy performed on the training set.
 25. The method ofclaim 21, wherein generating the classification model comprises: causingthe classification model to be trained using a first portion of theresults of spectroscopy performed on the training set, and verifying theclassification model for predictive strength using a second portion ofthe results of spectroscopy performed on the training set.
 26. Themethod of claim 21, further comprising: testing the classification modelusing a T-Odd/P-Even testing technique.
 27. The method of claim 21,wherein the device is a control device, and wherein providing theclassification model comprises: loading, by the control device, theclassification model onto multiple other control devices for utilizationwith multiple corresponding spectrometers.
 28. A device, comprising: oneor more memories; and one or more processors communicatively coupled tothe one or more memories, configured to: receive results of spectroscopyperformed on a training set, the training set including: a first set ofsamples of a particular type of food, and a second set of samples of theparticular type of food, the first set of samples complying withparticular dietary restrictions, and the second set of samples notcomplying with the particular dietary restrictions; generate, based onthe results of spectroscopy performed on the training set, aclassification model to categorize an unknown sample; and provide theclassification model based on generating the classification model. 29.The device of claim 28, wherein the results of spectroscopy are receivedfrom multiple spectrometers.
 30. The device of claim 28, wherein theclassification model is associated with a supervised learning model(SVM) technique.
 31. The device of claim 28, wherein the one or moreprocessors, when generating the classification model, are configured to:utilize a termed supervised learning model (SVM)-rhf type of kernelfunction to generate the classification model based on the results ofspectroscopy performed on the training set.
 32. The device of claim 28,wherein the one or more processors, when generating the classificationmodel, are configured to: cause the classification model to be trainedusing a first portion of the results of spectroscopy performed on thetraining set, and verify the classification model for predictivestrength using a second portion of the results of spectroscopy performedon the training set.
 33. The device of claim 28, wherein the one or moreprocessors are further configured to: test the classification modelusing a T-Odd/P-Even testing technique.
 34. The device of claim 28,wherein the device is a control device, and wherein the one or moreprocessors, when providing the classification model, are configured to:load the classification model onto multiple other control devices forutilization with multiple corresponding spectrometers.
 35. Anon-transitory computer-readable medium storing instructions, theinstructions comprising: one or more instructions that, when executed byone or more processors, cause the one or more processors to: receiveresults of spectroscopy performed on a training set, the training setincluding: a first set of samples of a particular type of food, and asecond set of samples of the particular type of food, the first set ofsamples complying with particular dietary restrictions, and the secondset of samples not complying with the particular dietary restrictions;generate, based on the results of spectroscopy performed on the trainingset, a classification model to categorize an unknown sample; provide theclassification model based on generating the classification model. 36.The non-transitory computer-readable medium of claim 35, wherein theresults of spectroscopy are received from multiple spectrometers. 37.The non-transitory computer-readable medium of claim 35, wherein theclassification model is associated with a supervised learning model(SVM) technique.
 38. The non-transitory computer-readable medium ofclaim 35, wherein the one or more instructions, that cause the one ormore processors to generate the classification model, cause the one ormore processors to: utilize a termed supervised learning model (SVM)-rhftype of kernel function to generate the classification model based onthe results of spectroscopy performed on the training set.
 39. Thenon-transitory computer-readable medium of claim 35, wherein the one ormore instructions, that cause the one or more processors to generate theclassification model, cause the one or more processors to: cause theclassification model to be trained using a first portion of the resultsof spectroscopy performed on the training set, and verify theclassification model for predictive strength using a second portion ofthe results of spectroscopy performed on the training set.
 40. Thenon-transitory computer-readable medium of claim 35, wherein the one ormore instructions, when executed by the one or more processors, furthercause the one or more processors to: test the classification model usinga T-Odd/P-Even testing technique.